{% extends '::base.html.twig' %}

{% block body %}
	{{ parent() }}
	<h1>User Submission</h1>
	<div align=center>
		<form method="POST" action=""> 
			<table width=200 style='table-layout:fixed;' >
				<tr>
					<td>Show:</td>
					<td>
						<select name="id">
							{% for s in row %}
								{% if ( s.id != selected ) %}
									<option value="{{ s.id }}">{{ s.id }}</option>
								{% elseif ( s.id == selected ) %}
									<option value="{{ s.id }}" selected="selected" >{{ s.id }}</option>
								{% endif %}
							{% endfor %}
						</select>
					</td>
					<td><input type="submit" value="Select" class="grey-button" /></td>
					{% if ( selected != -1 ) %}
					
					{% endif %}
				</tr>
			</table>
		</form>
	</div>
	<br style="clear:both;"/>
	<br style="clear:both;"/>
	{% if ( selected != -1 ) %}
		<div align="center">
			<table width=700 style="text-align:center;border-width: 2px;border-style:solid;	border-color:black;	border-collapse:collapse;" >
				<tr style="font-weight:bold; text-align:center;border-width: 1px;border-style:solid;	border-color:black;	border-collapse:collapse;">
					<td style="padding:5px;">User ID:</td>
					<td>User Name:</td>
					<td>Accepted:</td>
					<td>Declined:</td>
					<td>Pending:</td>
					<td>Total:</td>
				</tr>
				<tr>
					<td style="padding:5px;">{{ userSumbittion[0].user_id }} </td>
					<td>{{ userStatus.userName }} </td>
					<td>{{ userStatus.accepted }} </td>
					<td>{{ userStatus.declined }} </td>
					<td>{{ userStatus.pending }} </td>
					<td>{{ userStatus.total }} </td>
				</tr>
			</table>
		</div>
		<br/>
		<table width=850 style='table-layout:fixed;text-align:left; ' >
			<tr style="font-size:20px;">
				<td width="15%" style="padding-bottom:20px;"></td>
				<td><b>New Version</b></td>
				<td><b>Old Version</b></td>
			</tr>
			<tr>
				<td width="15%" style="padding-bottom:20px;"><b>Name: </b></td>
				<td>{{ userSumbittion[0].name }} </td>
				<td>{{ series[0].name }} </td>
			</tr>
			<tr>
				<td width="15%" style="padding-bottom:20px;"><b>First Aired: </b></td>
				<td>{{ userSumbittion[0].first_aired }} </td>
				<td>{{ series[0].first_aired }} </td>
			</tr>
			<tr>
				<td width="15%" style="padding-bottom:20px;"><b>Network: </b></td>
				<td>{{ userSumbittion[0].network }} </td>
				<td>{{ series[0].network }} </td>
			</tr>
			<tr>
				<td width="15%" style="padding-bottom:20px;"><b>Status: </b></td>
				<td>{{ userSumbittion[0].status }} </td>
				<td>{{ series[0].status }} </td>
			</tr>
			<tr>
				<td width="15%" style="padding-bottom:20px;"><b>Return Date:  </b></td>
				<td>{{ userSumbittion[0].return_date }} </td>
				<td>{{ series[0].return_date }} </td>
			</tr>
			<tr>
				<td width="15%" style="padding-bottom:20px;"><b>Description: </b></td>
				<td style="padding-right:25px;">{{ userSumbittion[0].description }} </td>
				<td style="padding-right:25px;">{{ series[0].description }} </td>
			</tr>
		</table>
		<br/>
		<table  width=850 style='table-layout:fixed; ' >
			<tr>
				<td width="15%" style="padding:10px;"><b>Fanart: </b></td>
				<td style="padding:10px;"><img src="{{ asset('uploads/documents/' ~ userSumbittion[0].path ) }}" /> </td>
			</tr>
			<tr>
				<td width="15%" style="padding:10px;"><b>Comments:</b></td>
				<td>{{ userSumbittion[0].comment }} </td>
			</tr>
			<tr>
				<td width="15%" style="padding:10px;"><b>Sources: </b></td>
				<td>{{ userSumbittion[0].source }} </td>
			</tr>
		</table>
		<br/>
		<div align=center> 
			<table  width=200 style='table-layout:fixed; ' >
				<tr>
					<td>
						<form method="POST" action="">
							<input type="hidden" name="accept" value="{{ userSumbittion[0].id }}" />
							<input type="submit" value="Accept" class="grey-button"/>
						</form>
					</td>
					<td>
						<form method="POST" action="">
							<input type="hidden" name="decline" value="{{ userSumbittion[0].id }}" />
							<input type="submit" value="Decline" class="grey-button"/>
						</form>
					</td>
				</tr>
			</table>
		</div>
		<br style="clear:both;"/>
	{% endif %}
	{% endblock %}